﻿namespace _3DExercise
{
    using System.Collections.Generic;

    public class Path
    {
        //// Create a class Path to hold a sequence of points in the 3D space.

        private List<Point3D> pathByPoints;

        public Path()
        {
            this.PathByPoints = new List<Point3D>();
        }

        public Path(List<Point3D> listOfPoints)
        {
            this.PathByPoints = listOfPoints;
        }

        public Path(params Point3D[] points) : this()
        {
            List<Point3D> tempy = new List<Point3D>();

            foreach (var point in points)
            {
                tempy.Add(point);
            }

            this.PathByPoints = tempy;
        }

        public List<Point3D> PathByPoints
        {
            get
            {
                return this.pathByPoints;
            }

            private set
            {
                this.pathByPoints = value;
            }
        }

        public void AddPointToThePath(Point3D inputPoint)
        {
            this.pathByPoints.Add(inputPoint);
        }
    }
}